#include "TcpServer.hpp"

using namespace dsh_tcpserver;

static void Usage(const std::string& process)
{
    std::cout << "\nUsage: " << process << " port\n" << std::endl;
}

void debug(int sock)
{
    std::cout << "test" << std::endl;
}



int main(int argc, char* argv[])
{
    if (argc != 2)
    {
        Usage(argv[0]);
        exit(1);
    }
    std::unique_ptr<TcpServer> server(new TcpServer(atoi(argv[1])));
    server->BindService(debug); 
    server->Start();

    return 0;
}